Method for Optimizing HVAC Systems in Buildings Using Nonlinear Programming to Maximize Comfort for Occupants

ABSTRACT

A heating, ventilation and air-conditioning (HVAC) system for a building is optimized while maximizing a comfort of occupants and minimizing energy consumption. The building is modeled as a network of nodes and edges, wherein the nodes represent rooms, and the edges represent walls. Dynamics of temperatures and humidity in the rooms and the temperature of the walls and the building are modeled using differential equations and the network. The comfort of the occupants is modeled by a predicted mean vote (PMV). The minimizing is formulated as an optimal control problem, which is discretized using an integration technique to obtain a finite dimensional optimization problem. Then, the finite dimensional optimization problem is solved using sparse linear algebra until convergence.

FIELD OF THE INVENTION

The present invention relates generally to controlling heating, ventilation and air conditioning (HVAC) systems in buildings, and more particularly to maximizing comfort for building occupants.

BACKGROUND OF THE INVENTION

The comfort of building occupants must be maximized while minimizing energy costs. Most conventional strategies for operating HVAC systems:

(i) Do not consider the entire system. For instance, the control over multiple rooms in the building is usually decoupled to yield smaller loops over which the control actions are independently solved. This approach fails to consider the full coupling between the subsystems and can lead to poor performance. (ii) Do not consider thermal and humidity dynamics of the building that predict the evolution of temperature humidity over time. (iii) Do not consider occupant comfort metrics, such as a predicted mean vote (PMV), or thermal comfort zones during the determination of the operational strategies, and instead employ set-point based strategies. This can lead to increased energy consumption and discomfort for the occupants.

Most model based optimization approaches for determining the HVAC operational strategies:

(i) Employ linear programming for the optimization, which can fail to fully model the complete dynamics of the system. (ii) Do not include constraints on thermal comfort, such as the PMV, and instead rely on set-points for temperature. This can result in increased energy costs. (iii) When the PMV is used, the model is simplified by linearizing the system equation, which leads to inaccuracies in estimating the true comfort of the occupants. This can result in increased discomfort for the occupants.

Thus, there is a need to optimize a building HVAC system, and to consider accurate models of occupant comfort and building thermal and humidity dynamics.

SUMMARY OF THE INVENTION

The embodiments of the invention provide a method for determining an optimal operation of a HVAC system by minimizing energy consumption, while maximizing occupant comfort. The building dynamics are modeled using differential equations that control an evolution of temperatures and humidity in rooms. An energy consumption of the HVAC system is modeled using steady state equations, or differential equations. The occupant comfort is measured using comfort indices such as a predicted mean vote (PMV).

The PMV determinations involve conditional statements, which result in nonsmooth behavior. Several embodiments for reformulating the conditional statements to computationally tractable forms that are suitable for optimization are provided. A nonlinear program incorporating sparse linear algebra is used to ensure computational efficiency of the method.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is floor plan of a building with indoor air conditioners installed in each room and connected with an outdoor unit;

FIG. 2A is the floor plan with numbered rooms;

FIG. 2B is a graphical representation of the rooms with nodes representing rooms, and edges representing rooms that share a common wall;

FIG. 3A is a resistor-capacitor representation of the thermal dynamics of room air;

FIG. 3B is a resistor-capacitor representation of the thermal dynamics of the wall in the room;

FIG. 3C is a resistor-capacitor representation of the humidity dynamics of room air;

FIG. 4 is a flowchart of a method for determining optimal operation of an HVAC system; and

FIG. 5 is a block diagram of a procedure for minimizing electric power consumption of the outdoor unit according to embodiments of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Building Representation

FIG. 1 shows a floor plan for a building that can be used by embodiments of our invention. The building includes rooms 10 and doors 12. Each room is equipped with an indoor air conditioning unit 20. The indoor units are connected to an outdoor unit 26. A refrigerant is used for cooling or heating room air flows 22 to the indoor units from the outdoor unit. The refrigerant flows (dashed lines) 24 from the indoor unit to the outdoor unit where the heat is dissipated and the refrigerant is recycled back to the indoor unit 22.

FIG. 2A shows a numbering of nine rooms 30 in the building, i.e., 1 to 9. The graph network representation in FIG. 2B based on this numbering. Nodes 40 represent the rooms in the building, and edges 42 represent the rooms that share a wall.

FIG. 3A provides a resistive capacitive network representation of the building model for thermal and humidity dynamics. The variables used in this figure and other similar figures are described in detail below.

Input

As shown in FIG. 4, input to the optimization method 410 includes the following for a time period:

Forecast 401 of hourly weather pattern.

Equipment heat load forecast 402 for each room.

Prediction 403 of the occupant heat loads.

Comfort requirements 404 for the occupants.

Objectives 405 of the optimization.

The method uses objectives for the optimization 405 and a model 406.

The steps of the method as described herein can be performed in a processor connected to a memory, and input and output interfaces as known in the art.

Output

Output 420 of the method includes a time profile of control variables in the model which can include: compressor frequency, air flow rate from each room through the conditioner, and the evolution of the temperatures of the room, temperatures of the walls and humidity in the rooms as a result of choice of prescribed control actions. All temperatures are in degrees centigrade.

Room Dynamics Model

In the preferred embodiment, the dynamics of the room are modeled as a set of differential equations. A linear resistive capacity circuit modeling the room temperature dynamics is shown in FIG. 3A. The thermal dynamics of the room is modeled as

$\begin{matrix} {{\frac{T_{z}}{t} = {\frac{T_{w} - T_{z}}{C_{z}R_{zw}} + \frac{{\overset{.}{m}}_{vent}{C_{p}\left( {T_{oa} - T_{z}} \right)}}{C_{z}} + \frac{{\overset{.}{Q}}_{sen}}{C_{z}} + \frac{{\overset{.}{Q}}_{{sen},{hvac}}}{C_{z}}}},} & (1) \end{matrix}$

where T_(z) is the temperature of the room in degrees centigrade, T_(w) is the temperature of wall in the room, C_(z) is the heat capacity of the room air in Joules (J) per kilogram (kg), R_(zw) is the resistance for heat transfer between the zone air and the walls of the zone, T_(oo) is the ambient air temperature, C_(p) is the specific heat capacity of air in (J/kg/K), {dot over (m)}_(vent) is the flow rate of ventilation air in (kg/s), {dot over (Q)}_(sen) is a rate of sensible heat generated by equipment, occupants in the room and solar radiation through windows, {dot over (Q)}_(sen,hvac) is a rate of sensible heat transferred to the room air from the indoor air conditioning unit. The dot above the variables indicates the first derivative with respect to time.

The linear resistive capacity circuit modeling the temperature dynamics of the room wall is shown in FIG. 3B. The thermal dynamics of the wall in the room is modeled as

$\begin{matrix} {{\frac{T_{w}}{t} = {\frac{T_{z} - T_{w}}{C_{w}R_{zw}} + \frac{T_{oa} - T_{w}}{C_{w}R_{woa}} + \frac{{\overset{.}{Q}}_{ins}}{C_{w}}}},} & (2) \end{matrix}$

where C_(w) is the heat capacity of the wall in (J/k), R_(woa) is the resistance for heat transfer between the wall and ambient air and {dot over (Q)}_(inv) is the rate of heat transfer from solar radiation to the wall in (W).

The linear resistive capacity circuit modeling the room humidity dynamics is shown in FIG. 3C. The humidity dynamics of the room air is modeled as

$\begin{matrix} {{\frac{h_{z}}{t} = {\frac{{\overset{.}{m}}_{vent}\left( {h_{oa} - h_{z}} \right)}{\rho \; V_{a}} + \frac{{\overset{.}{Q}}_{lat}}{\rho \; V_{a}L_{v}} + \frac{{\overset{.}{Q}}_{{lat},{hvac}}}{\rho \; V_{a}L_{v}}}},} & (3) \end{matrix}$

where h_(z) is the specific humidity of zone air in (kg/kg), ρ is the density of air, V_(a) is the volume of air in the room, L is the latent heat of evaporation of water in (J/kg), {dot over (Q)}_(lat) is the rate of latent heat generated by equipment and occupants in the room in (W) and {dot over (Q)}_(lat,hvac) is the rate of latent heat added to the room air by the indoor air conditioning unit.

Predicted Mean Vote

In the preferred embodiment, a predicted mean vote (PMV) is used to measure the occupant comfort, see ANSI/ASHRAE Standard 55-2010, Thermal Environmental Conditions for Human Occupancy. The PMV includes parameters that influence comfort: temperature, relative humidity, air velocity, metabolic rate, mean radiant temperature, and clothing insulation. The PMV measures the thermal comfort of the occupants on a scale of −3 to +−3 with: −3: very cold, −2: cold, −1: slightly cool, 0: neutral, +1: slightly warm, +2: warm, +3: hot. The typical range for different building types is prescribed in the American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) standard ISO 7730:2005.

The PMV is determined by the following equations:

$\begin{matrix} {{PMV} = {\left( {{0.303^{{- 0.036}\mspace{11mu} M}} + 0.028} \right){\quad{\left\lbrack {\left( {M - W} \right) - {3.05 \times 10^{- 3}\left( {5733 - {6.999\left( {M - W} \right)} - p_{a}} \right)} - {0.42\left( {\left( {M - W} \right) - 58.15} \right)} - {1.7 \times 10^{- 5}\mspace{11mu} {M\left( {5867 - p_{a}} \right)}} - {0.0014\mspace{14mu} {M\left( {34 - T_{z}} \right)}} - {3.96 \times 10^{- 8}{f_{cl}\left( {\left( {T_{cl} + 273.15} \right)^{4} - \left( {{\overset{\_}{T}}_{r} + 273.15} \right)^{4}} \right)}} - {f_{cl}{h_{c}\left( {T_{cl} - T_{z}} \right)}}} \right\rbrack,}}}} & (4) \\ {{T_{cl} = {35.7 - {0.028\left( {M - W} \right)} - {3.96 \times 10^{- 8}I_{cl}{f_{cl}\left( {\left( {T_{cl} + 273.15} \right)^{4} - \left( {{\overset{\_}{T}}_{r} + 273.15} \right)^{4}} \right)}} + {I_{cl}f_{cl}{h_{c}\left( {T_{cl} - T_{z}} \right)}}}},} & (5) \\ {h_{c} = \left\{ {\begin{matrix} {{2.38{{T_{cl} - T_{z}}}^{0.25}},} & {{{if}\mspace{14mu} 2.38{{T_{cl} - T_{z}}}^{0.25}} > {12.1\sqrt{v_{ar}}}} \\ {{12.1\sqrt{v_{ar}}},} & {{{if}\mspace{14mu} 2.38{{T_{cl} - T_{z}}}^{0.25}} < {12.1\sqrt{v_{ar}}}} \end{matrix},} \right.} & (6) \\ {\mspace{79mu} {f_{cl} = \left\{ {\begin{matrix} {{1.00 + {1.29I_{cl}}},} & {{{if}\mspace{14mu} I_{cl}} \leq 0.078} \\ {{1.05 + {0.645\; I_{cl}}},} & {{{if}\mspace{14mu} I_{cl}} > 0.078} \end{matrix},} \right.}} & (7) \\ {\mspace{79mu} {{p_{a} = {\frac{h_{z}}{0.622 + h_{z}}p_{atm}}},}} & (8) \end{matrix}$

where T_(z) is the temperature of the room, h_(z) is the absolute specific humidity in the room, M is the metabolic rate in (W/m²), W is the effective mechanical power in (W/m²), I_(cl) is the clothing insulation in (m²k/W), f_(cl) is the clothing area factor, T _(r) is the mean radiant temperature, v_(ar) is the relative air velocity in the room in (m/s), h_(c) is the convective heat transfer coefficient in (W/m²/K), p_(a) is the water vapor partial pressure in atmospheres (atm), T_(cl) is the clothing surface temperature, and p_(atm) is the atmospheric pressure in (atm).

In the PMV model equations, M, W, I_(cl), f_(cl) are parameters that are specified by the type of activity, e.g., sedentary office work, vigorous workout, that occurs in the room and clothing insulation material that is worn by the occupants in the room. These are not decision variables in the optimization problem. Although Eq. (7) has conditional statement, the value of f_(cl) can be determined a priori for the entire period over which the optimization is performed.

However, Eq. (6) involves conditional statements involving the decision variables in the optimization problem T_(z), T_(cl). One approach to handle this is to add binary variables to the optimization problem and express the conditional statement as

zε{0,1}

2.38|T _(cl) −T _(z)|^(0.25)≧(12.1√{square root over (v _(ar))})z

h _(c)=(2.38|T _(cl) −T _(z)|^(0.25))z+12.1√{square root over (v _(ar))}(1−z).  (9)

If z=1 in Eq. (9), then the first condition in Eq. (6) is enforced and consequently, h_(c)=2.38|T_(cl)−T_(z)|^(0.25). If z=0, then the second conditional in Eq. (6) is enforced and consequently, h_(c)=12.1√{square root over (v_(ar))}. With this modification, the optimization problem using PMV indices and Eq. (9) will fall in the class of mixed integer nonlinear programs (MINLPs), which are typically computationally complex.

To address the computational intractability of binary variable based modeling, while still retaining the original PMV formulation, we pose the conditional statement as

h _(c)=max(2.38|T _(cl) −T _(z)|^(0.25),12.1√{square root over (v _(ar))}).  (10)

This expresses the conditional statement in Eq. (6) but does not allow continuous optimization because Eq. (10) is not smooth. To address this concern, we first consider the following exact reformulation:

$\begin{matrix} {h_{c} = {\frac{1}{2}{\begin{pmatrix} {{2.38{{T_{cl} - T_{z}}}^{0.25}} + {12.1\sqrt{v_{ar}}} +} \\ \sqrt{\left( {{2.38{{T_{cl} - T_{z}}}^{0.25}} - {12.1\sqrt{v_{ar}}}} \right)^{2}} \end{pmatrix}.}}} & (11) \end{matrix}$

It can be verified in Eq. (11) that if the first conditional in Eq. (6) holds, then h_(c)=2.38|T_(cl)−T_(z)|^(0.25). On the other hand, if the second conditional in Eq. (6) holds, then h_(c)=12.1√{square root over (v_(ar))}. Eq. (11) is differentiable everywhere except at 2.38|T_(cl)−T_(z)|^(0.25)=12.1√{square root over (v_(ar))} because the square root function is not differentiable at 0. This point of non-differentiability is problematic for continuous optimization. To address this concern, the smoothing procedure is applied to Eq. (11) as

$\begin{matrix} {{h_{c} = {\frac{1}{2}\begin{pmatrix} {{2.38{{T_{cl} - T_{z}}}^{0.25}} + {12.1\sqrt{v_{ar}}} +} \\ \sqrt{\left( {{2.38{{T_{cl} - T_{z}}}^{0.25}} - {12.1\sqrt{v_{ar}}}} \right)^{2} + \tau^{2}} \end{pmatrix}}},} & (12) \end{matrix}$

where τ>0 is the smoothing parameter. For all τ>0. Eq. (12) is differentiable everywhere and the continuous optimization algorithms can be readily applied. Because the smoothing parameter τ>0 has to be driven to zero to recover Eq. (6), the method solves a sequence of optimization problem where the value of the smoothing parameter is monotonically decreased. This provides an accurate method for handling the nonsmooth conditional in Eq. (6) and uses continuous optimization algorithms, which are computationally efficient.

A third approach handles the nonsmooth conditionals in Eq. (10) by writing the max operator as

$\begin{matrix} {{z = {\arg \; {\min\limits_{0 \leq y \leq 1}\mspace{14mu} {\left( {{{- 2.38}\left. {T_{cl} - T_{z}} \right\rceil^{0.25}} + {12.1\sqrt{v_{ar}}}} \right)y}}}}{h_{c} = {{\left( {2.38{{T_{cl} - T_{z}}}^{0.25}} \right)z} + {12.1\sqrt{v_{ar}}{\left( {1 - z} \right).}}}}} & (13) \end{matrix}$

In Eq. (13), if the first conditional of Eq. (6) is satisfied, then

z=1 and h _(c)=2.38|T _(cl) −T _(z)|^(0.25)

holds. If the second conditional in Eq. (6) is satisfied, then

z=0 and h _(c)=12.1√{square root over (v _(ar))},

This formulation is still not convenient for optimization. Therefore, we replace the minimization in Eq. (13) with the first order stationary conditions as

−2.38|T _(cl) −T _(z)|^(0.25)+12.1√{square root over (v _(ar))}−λ+v=0

λ≧0⊥z≧0

v≧0⊥z≦1

h _(c)=(2.38|T _(cl) −T _(z)|^(0.25))z+12.1√{square root over (v _(ar))}(1−z).  (14)

In Eq. (14), λ≧0⊥z≧0 is a complementarity constraint equivalent to λ, z≧0, λz=0, In other words, λ=0 or z=0. Similarly, the other complementarity condition v≧0⊥z≦1 implies that v=0 or z=1. When these two conditions are taken together it can be seen that λ, v>0 cannot occur since the complementarity conditions will imply that z=0 and z=1. If the first conditional in Eq. (6) holds, then v=12.1√{square root over (v_(ar))}−2.38|T_(cl)−T_(z)|^(0.25) and λ=0, which implies that z=1 and h_(c)=2.38|T_(cl)−T_(z)|^(0.25) holds. The case of the second conditional in Eq. (6) holding can be similarly verified.

Complementarity conditions are difficult to handle within optimization problems. A conventional approach relaxes the conditional statements

−2.38|T _(cl) −T _(z)|^(0.25)+12.1√{square root over (v _(ar))}−λ+v=0

λ,z≧0,λz≦τ

v≧0,z≦1,v(1−z)≦τ

h _(c)=(2.38|T _(cl) −T _(z)|^(0.25))z+12.1√{square root over (v _(ar))}(1−z)  (15)

where τ>0 is a relaxation parameter. For all τ>0, Eq. (15) provides a strictly feasible interior to the optimization problems and continuous optimization can be readily applied. Because the smoothing parameter τ>0 has to be driven to zero to recover Eq. (6), the method solves a sequence of optimization problem where the value of the smoothing parameter is monotonically decreased. This provides an accurate method for handling the nonsmooth conditional in Eq. (6) and uses continuous optimization, which is computationally efficient.

A fourth approach to handle the conditionals in Eq. (6) is to simplify the equations. Typically, the temperature difference between the zone air and clothing in the room |T_(z)−T_(cl)| is less than 5 degrees C. Further, in air conditioned rooms, the relative velocity of the air v_(ar) is typically 0.1 m/s. For these conditions, it can be assumed that the second conditional is satisfied and consequently, we simplify the conditionals in Eq. (6) as

h _(c)=12.1√{square root over (v _(ar))}.  (16)

Building Dynamics and Occupant Comfort Model

In the preferred embodiment, the dynamical model for a building includes N: rooms and N, walls represented as

$\begin{matrix} {{\frac{T_{z,i}}{t} = {{{\sum\limits_{j:{j\sim i}}^{\;}\; \frac{T_{w,j} - T_{z,i}}{C_{z,i}R_{{zw},{ij}}}} + \frac{{\overset{.}{m}}_{{vent},i}{C_{p}\left( {T_{oa} - T_{z,i}} \right)}}{C_{z,i}} + \frac{{\overset{.}{Q}}_{{sen},i}}{C_{z,i}} + {\frac{{\overset{.}{Q}}_{{sen},{hvac},i}}{C_{z,i}}{\forall i}}} = 1}}, \ldots \mspace{14mu},N_{z},} & (17) \end{matrix}$

where the differential variables the subscript i denotes a quantity associated with a room, subscript j denotes a quantity associated with a wall, subscript ij denotes a quantity associated with room i and wall j and notation j:i˜j denotes the set of (i,j) that such that room i has wall j. In the above, T_(z,i) represent the air temperature in room i, T_(w,j) represents the temperature of wall j, {dot over (Q)}_(sen,i) represents the rate of sensible heat generation from equipment, occupants and solar radiation through windows, {dot over (Q)}_(sen,hvac) represent the rate of sensible heating delivered by the air conditioner in room i, {dot over (m)}_(vent,i) is the ventilation air flow rate from room i, C_(z,i) is the heat capacity of air in room i and R_(zw,ij) is the resistance for heat transfer between air in room i and wall j.

The thermal dynamics of the wall in the building are represented as

$\begin{matrix} {{\frac{T_{w,j}}{t} = {{{\sum\limits_{i:{j\sim i}}^{\;}\frac{T_{z,i} - T_{w,j}}{C_{w,j}R_{{zw},{ij}}}} + \frac{T_{oa} - T_{w,j}}{C_{w,j}R_{{woa},j}} + {\frac{{\overset{.}{Q}}_{{ins},j}}{C_{w,j}}{\forall j}}} = 1}},\ldots \mspace{14mu},N_{w},} & (18) \end{matrix}$

where C_(w,j) represents the heat capacity of wall j, R_(woa,j) represents the resistance for heat transfer between the wall j and the outside air, {dot over (Q)}inv,i is the rate of heat gain on wall j from solar radiation, and notation i:i˜j denotes the set of (i,j) that such that room i has wall j.

The humidity dynamics of the rooms in the building are represented as

$\begin{matrix} {{\frac{T_{z,i}}{t} = {{\frac{{\overset{.}{m}}_{{vent},i}\left( {h_{oa} - h_{z,i}} \right)}{\rho \; V_{a,i}} + \frac{{\overset{.}{Q}}_{{lat},i}}{\rho \; V_{a,i}L_{v}} + {\frac{{\overset{.}{Q}}_{{lat},{hvac},i}}{\rho \; V_{a,i}L_{v}}{\forall i}}} = 1}},\ldots \mspace{14mu},N_{z},} & (19) \end{matrix}$

where h_(z,i) is the humidity of the air in room i, V_(a,i) is the volume of air in room i, {dot over (Q)}_(lat,i) is the rate of heat generated by equipment, occupants in room i, and {dot over (Q)}_(lat,hvac,i) is the rate of latent heat delivered by the air conditioner in room i.

The occupant comfort model for all rooms in the building is represented as

$\begin{matrix} {{PMV}_{i} = {\left( {{0.303\; ^{{- 0.036}\; M_{i}}} + 0.028} \right)\left\lbrack {\left( {M_{i} - W_{i}} \right) - {3.05 \times 10^{- 3}\left( {5733 - {6.999\left( {M_{i} - W_{i}} \right)} - p_{a,i}} \right)} - {0.42\left( {\left( {M_{i} - W_{i}} \right) - 58.15} \right)} - {1.7 \times 10^{- 5}{M_{i}\left( {5867 - p_{a,i}} \right)}} - {0.0014\; {M_{i}\left( {34 - T_{z,i}} \right)}} - {3.96 \times 10^{- 8}{f_{{cl},i}\left( {\left( {T_{{cl},i} + 273.15} \right)^{4} - \left( {{\overset{\_}{T}}_{r,i} + 273.15} \right)^{4}} \right)}} - {f_{{cl},i}{h_{c,i}\left( {T_{{cl},i} - T_{z,i}} \right)}}} \right\rbrack}} & (20) \\ {\mspace{79mu} {{{\forall i} = 1},\ldots \mspace{14mu},N_{z},}} & \; \\ {{T_{{cl},i} = {{35.7 - {0028\left( {M_{i} - W_{i}} \right)} - {3.96 \times 10^{- 8}I_{{cl},i}{f_{{cl},i}\left( {\left( {T_{{cl},i} + 273.15} \right)^{4} - \left( {{\overset{\_}{T}}_{r,i} + 273.15} \right)^{4}} \right)}} + {I_{{cl},i}f_{{cl},i}{h_{c,i}\left( {T_{{cl},i} - T_{z,i}} \right)}{\forall i}}} = 1}},\ldots \mspace{14mu},N_{z},} & (21) \\ {h_{c,i} = \left\{ {\begin{matrix} {{2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}},{{{if}\mspace{14mu} 2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} > {12.1\sqrt{v_{{ar},i}}}}} \\ {{12.1\sqrt{v_{{ar},i}}},{{{if}\mspace{14mu} 2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} < {12.1\sqrt{v_{{ar},i}}}}} \end{matrix},} \right.} & (22) \\ {\mspace{79mu} {f_{{cl},i} = \left\{ {{{\begin{matrix} {{1.00 + {1.29\; I_{{cl},i}}},} & {{{if}\mspace{14mu} I_{{cl},i}} \leq 0.078} \\ {{1.05 + {0.645\; I_{{cl},i}}},} & {{{if}\mspace{14mu} I_{{cl},i}} > 0.078} \end{matrix}{\forall i}} = 1},\ldots \mspace{14mu},N_{z},} \right.}} & (23) \\ {\mspace{76mu} {{p_{a,i} = {{\frac{h_{z,i}}{0.622 + h_{z,i}}p_{atm}{\forall i}} = 1}},\ldots \mspace{14mu},N_{z},}} & (24) \end{matrix}$

where for room i, PMV_(i) is the predicted mean vote index for occupants in the room, M_(i) is the metabolic rate in (W/m²) for occupants in the room, W_(i) is the effective mechanical power in (W/m²) in the room, I_(cl,i) is the clothing insulation in (m²K/W) in the room, f_(cl,i) is the clothing area factor in the room, T _(r,i) is the mean radiant temperature in the room, v_(ar,i) is the relative air velocity in the room in (m/s), h_(c,i) is the convective heat transfer coefficient in (W/m²/K), p_(a,i) is the water vapor partial pressure in (atm) in the room, T_(cl,i) is the clothing surface temperature in the room.

HVAC Outdoor and Indoor Unit

In the preferred embodiment, the outdoor and indoor units are modeled as

$\begin{matrix} {{{P_{hvac} = {a_{0} + {a_{1}*T_{oa}} + {a_{2}*{Cf}}}}{{\overset{.}{Q}}_{{all},{hvac}} = {b_{0} + {b_{1}*T_{oa}} + {b_{2}*C_{f}}}}X_{cond} = {\frac{\Delta \; X}{\Delta \; H}{\overset{.}{Q}}_{{all},{hvac}}}}{{\Delta \; X} = \frac{{\sum\limits_{i = 1}^{N_{z}}\; {{\overset{.}{m}}_{{hvac},i}h_{z,i}}} - {\sum\limits_{i = 1}^{N_{z}}{{\overset{.}{m}}_{{hvac},i}h_{out}}}}{\sum\limits_{i = 1}^{N_{z}}{\overset{.}{m}}_{{hvac},i}}}{{RH}_{out} = \frac{h_{out}}{0.622 + h_{out}}}{{\Delta \; H} = {{\sum\limits_{i = 1}^{N_{z}}{{\overset{.}{m}}_{{hvac},i}H_{z,i}}} - {\sum\limits_{i = 1}^{N_{z}}{{\overset{.}{m}}_{{hvac},i}H_{z,{out}}}}}}{H_{z,i} = {{C_{p}T_{z,i}} + {h_{z,i}\left( {{C_{pw}T_{z,i}} + L_{v}} \right)}}}{H_{z,{out}} = {{C_{p}T_{z,i}} + {h_{z,{out}}\left( {{C_{pw}T_{out}} + L_{v}} \right)}}}{T_{out} = {{\left( {1 - {BPF}} \right)*T_{cond}} + \frac{\sum\limits_{i = 1}^{N_{z}}{{\overset{.}{m}}_{{hvac},i}T_{z,i}}}{\sum\limits_{i = 1}^{N_{z}}{\overset{.}{m}}_{{hvac},i}}}}{{{\overset{.}{Q}}_{{sen},{hvac},i} = {{{\overset{.}{m}}_{{hvac},i}C_{p}T_{out}{\forall i}} = 1}},\ldots \mspace{14mu},N_{z}}{{{\overset{.}{Q}}_{{lat},{hvac},i} = {{{\overset{.}{m}}_{{hvac},i}{h_{out}\left( {{C_{p}T_{out}} + L_{v}} \right)}{\forall i}} = 1}},\ldots \mspace{14mu},N_{z},}} & (25) \end{matrix}$

where, P_(hvac) is the amount of electric power consumed by the HVAC outdoor unit, {dot over (Q)}_(all,hvac) is the total heating delivered by the HVAC unit, Cf is the compressor frequency of the HVAC unit, a₀, a₁, a₂, b₀, b₁, b₂ are constants, X_(cond) is the amount of condensation in the outdoor unit, ΔX is the difference in specific humidity between the inlet and outlet of the outdoor unit, {dot over (m)}_(hvac,i) is the mass flow rate of air from the room air conditioners, h_(out) is the specific humidity of air at outlet of outdoor unit, RH_(out) is the relative humidity of air at outlet of outdoor unit, ΔH is the difference in specific enthalpy between the inlet and outlet of the outdoor unit, H_(z,i) is the specific enthalpy of the return air from the air conditioner in room i, H_(out) is the specific enthalpy of the air supplied by the outdoor unit to the rooms, BPF is the bypass factor of the outdoor unit, T_(cond) is the condensation temperature at the outdoor unit.

Typically, RH_(out) is selected to 95%, BPF is selected to 0.2 and T_(cond) is selected to 5 deg C.

The model in Eq. (25) applies for a single outdoor unit, and can be extended to the case of multiple outdoor units.

Comfort Optimization Formulation

In the preferred embodiment, the optimization minimizes the electric power consumption of the outdoor unit as,

$\begin{matrix} {\min \mspace{14mu} {\int_{0}^{T}{P_{hvac}\ {t}}}} & (26) \\ \left. \begin{matrix} \; & {{{{Eq}.\mspace{14mu} (17)}\text{-}(19)},{{{Eq}.\mspace{14mu} (20)}\text{-}(21)},(23),(24),(25)} \\ {\; {s.t.}} & {h_{c,i} = {\frac{1}{2}\begin{pmatrix} {{2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} + {12.1\sqrt{v_{{ar},i}}} +} \\ \sqrt{\left( {{2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} - {12.1\sqrt{v_{{ar},i}}}} \right)^{2} + \tau^{2}} \end{pmatrix}}} \\ \; & {{{\forall i} = 1},\ldots \mspace{14mu},{N_{z}\mspace{14mu} {such}\mspace{14mu} {that}}} \end{matrix} \right\} & \; \\ {\left. {{\forall{t \in \left\lbrack {0,T} \right\rbrack}}{{{Initial}\mspace{14mu} {condition}\mspace{14mu} {for}\mspace{14mu} {room}\mspace{14mu} {temperatu}\mspace{14mu} {res}},{{humidity}\mspace{14mu} {and}\mspace{14mu} {wall}\mspace{14mu} {temperatu}\mspace{14mu} {res}}}\begin{matrix} \begin{matrix} {{{{Bounds}\mspace{14mu} {on}\mspace{14mu} {PMV}_{i}{\forall i}} = 1},\ldots \mspace{14mu},N_{z}} \\ {{{Bounds}\mspace{14mu} {on}\mspace{14mu} {Cf}},{\overset{.}{m}}_{{hvac},i}} \end{matrix} \\ {{Physical}\mspace{14mu} {bounds}\mspace{14mu} {on}\mspace{14mu} {variabl}\mspace{14mu} {es}} \end{matrix}} \right\} {\forall{t \in {\left\lbrack {0,T} \right\rbrack.}}}} & \; \end{matrix}$

In Eq. (26), a smoothing formulation is used to model the conditional statements in the PMV calculation. The comfort requirement is formulated as upper and lower limits on the PMV for each room. The values of +0.5 and −0.5 are typically used when the building is occupied. The compressor frequency is limited to be within 10 Hz˜80 Hz, and the mass flow rates are also limited based on the capacity of the fans in the individual air conditioning units. In addition, limits such as non-negativity of temperatures, humidity and other quantities from physical considerations are included in the optimization formulation.

There are a number of parameters whose values for the period of the optimization are provided. These parameters are:

-   -   (Q_(ins,1), . . . , Q_(ins,N) _(w) , T_(oa), h_(oa), M₁, W₁,         I_(cl,1), v_(ar,1), {dot over (Q)}_(sen,occ,1), {dot over         (Q)}_(lat,occ,1), . . . , M_(N) _(z) , W_(N) _(z) , I_(cl,N)         _(z) , V_(ar,N) _(z) , {dot over (Q)}_(sen,occ,N) _(z) , {dot         over (Q)}_(lat,occ,N) _(z) ).

As described above, the minimization problem in Eq. (26), based on smoothing formulation, is well behaved for τ>0, but the smoothing parameter has to be decreased to 0 to recover a solution to the original problem. The procedure for solving this problem is shown in FIG. 5.

For simplicity of this description, the building dynamics model is represented as

$\begin{matrix} {{\left. \begin{matrix} {\frac{x}{t} = {f^{diff}\left( {{x(t)},{y(t)},{u(t)},{(t)}} \right)}} \\ {{f^{a\; \lg}\left( {{x(t)},{y(t)},{u(t)},{(t)}} \right)} = 0} \end{matrix} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}}{{\left( {{x(0)},{y(0)}} \right) = \left( {\hat{x},\hat{y}} \right)},}} & (27) \end{matrix}$

where x the set of differential variables corresponds to

-   -   (T_(z,1), h_(z,1), . . . , T_(z,N) _(z) , h_(z,N) _(z) ,         T_(w,1), . . . , T_(w,N) _(w) ), y         the set of algebraic variables corresponds to     -   (PMV₁, T_(cl,1), T _(r,1), h_(c,1), p_(a,1), {dot over         (Q)}_(sen,hvac,1), {dot over (Q)}_(lat,hvac,1), . . . , PMV₁,         T_(cl,N) _(z) , T _(r,N) _(z) , h_(c,N) _(z) , p_(a,N) _(z) ,         {dot over (Q)}_(sen,hvac,N) _(z) , {dot over (Q)}_(lac,hvac,N)         _(z) ),         u the set of control variables corresponds to     -   (Cf, {dot over (m)}_(hvac,1), . . . , {dot over (m)}_(hvac,N)         _(z) ),         and d the set of time dependent parameters     -   (Q_(ins,1), . . . , Q_(ins,N) _(w) , T_(oa), h_(oa), M₁, W₁,         I_(cl,1), v_(ar,1), . . . , M_(N) _(z) , W_(N) _(z) , I_(cl,N)         _(z) , v).

The differential equations correspond to Equations (17)-(19). The algebraic equations correspond to Equations (20)-(21), (23)-(25) and the smoothing formulation (26). With this representation, the optimization problem in Eq. (26) can be recast as

$\begin{matrix} {\min \mspace{14mu} {\int_{0}^{T}{{c\left( {x,y,u} \right)}\ {t}}}} & (28) \\ {{\left. {{\left. {s.t.\mspace{14mu} \begin{matrix} {\frac{x}{t} = {f^{diff}\left( {{x(t)},{y(t)},{u(t)},{(t)}} \right)}} \\ {{f^{a\; 1\; g}\left( {{x(t)},{y(t)},{u(t)},{(t)}} \right)} = 0} \end{matrix}} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}}{\left( {{x(0)},{y(0)}} \right) = \left( {\hat{x},\hat{y}} \right)}\begin{matrix} \begin{matrix} {{\underset{\_}{x}(t)} \leq {x(t)} \leq {\overset{\_}{x}(t)}} \\ {{\underset{\_}{y}(t)} \leq {y(t)} \leq {\overset{\_}{y}(t)}} \end{matrix} \\ {{\underset{\_}{u}(t)} \leq {u(t)} \leq {\overset{\_}{u}(t)}} \end{matrix}} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}},} & \; \end{matrix}$

where x, x are lower and upper limits on differential variables, y, y are lower and upper limits on algebraic variables and u, ū Tare lower and upper limits on the controls.

The limits are assumed to be function of time because different bounds can be specified based on the occupancy conditions. The optimization problem in Eq. (28) is an instance of optimal control problem. These problems are generally solved by discretizing the differential and algebraic equations, which are now imposed at a finite set of time instances instead of all time instants in [0, T].

Discretization schemes, such as the explicit Euler, implicit Euler, Runge-Kutta methods, or collocation schemes can be used. With such a discretization, the problem in Eq. (28) is reduced to a nonlinear program with finite number of variables and constraints.

In the preferred embodiment, the optimal control problem is Eq. (28) is discretized using an implicit Euler scheme as

$\begin{matrix} {{\min \mspace{14mu} \Delta \; t{\sum\limits_{k = 1}^{N_{T}}\; {c\left( {x_{k},y_{k},u_{k}} \right)}}}\begin{matrix} {s.t.} & {{\frac{x_{k} - x_{k - 1}}{\Delta \; t} = {{{f^{diff}\left( {x_{k},y_{k},u_{k},d_{k}} \right)}{\forall k}} = 1}},\ldots \mspace{14mu},N_{T}} \\ \; & {{0 = {{{f^{a\; 1\; g}\left( {x_{k},y_{k},u_{k},d_{k}} \right)}{\forall k}} = 1}},\ldots \mspace{14mu},N_{T}} \\ \; & {\left( {x_{0},y_{0}} \right) = \left( {\hat{x},\hat{y}} \right)} \\ \; & {{{\left. \begin{matrix} \begin{matrix} {{\underset{\_}{x}}_{k} \leq x_{k} \leq {\overset{\_}{x}}_{k}} \\ {{\underset{\_}{y}}_{k} \leq y_{k} \leq {\overset{\_}{y}}_{k}} \end{matrix} \\ {{\underset{\_}{u}}_{k} \leq u_{k} \leq {\overset{\_}{u}}_{k}} \end{matrix} \right\} {\forall k}} = 1},\ldots \mspace{14mu},N_{T},} \end{matrix}} & (29) \end{matrix}$

where Δt is the time step of the discretization and N_(T)=T/Δt are the number of discretization steps in the optimization. The optimization problem in Eq. (29) is very sparse and appropriate use of spare linear algebra can reduce the computational complexity.

In the preferred embodiment, the optimization problem in (29) is solved using nonlinear programming algorithms that use sparse linear algebra techniques.

In another embodiment the conditional equations in PMV calculation is formulated using complementarity constraints

$\begin{matrix} {\left. {{\left. {{\min \mspace{14mu} {\int_{0}^{T}{P_{hvac}\ {t}}}}\begin{matrix} \; & {{{{Eq}.\mspace{14mu} (17)}\text{-}(19)},{{{Eq}.\mspace{14mu} (20)}\text{-}(21)},(23),(24),(25)} \\ \; & {{{{- 2.38}{{T_{{cl},i} - T_{z,i}}}^{0.25}} + {12.1\sqrt{v_{{ar},i}}} - \lambda_{i} + v_{i}} = 0} \\ \; & {\lambda_{i},{z_{i} \geq 0},{{\lambda_{i}z_{i}} \leq \tau}} \\ \; & {{1 - z_{i}},{v_{i} \geq 0},{{\left( {1 - z_{i}} \right)v_{i}} \leq \tau}} \\ {s.t.} & {h_{c,i} = {{\left( {2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} \right)z_{i}} + {12.1\sqrt{v_{{ar},i}}\left( {1 - z_{i}} \right)}}} \\ \; & {{{\forall i} = 1},\ldots \mspace{14mu},{N_{z}\mspace{14mu} {such}\mspace{14mu} {that}}} \end{matrix}} \right\} \begin{matrix} \; \\ \; \\ \; \\ \; \\ \; \end{matrix}}{\forall{t \in \left\lbrack {0,T} \right\rbrack}}{{{Initital}\mspace{14mu} {condition}\mspace{14mu} {for}\mspace{14mu} {room}\mspace{14mu} {temperatu}\mspace{14mu} {res}},{{humidity}\mspace{14mu} {and}\mspace{14mu} {wall}\mspace{14mu} {temperatu}\mspace{14mu} {res}}}\begin{matrix} \begin{matrix} {{{{Bounds}\mspace{14mu} {on}\mspace{14mu} {PMV}_{i}{\forall i}} = 1},\ldots \mspace{14mu},N_{z}} \\ {{{Bounds}\mspace{14mu} {on}\mspace{14mu} {Cf}},m_{{hvac},i}} \end{matrix} \\ {{Physical}\mspace{14mu} {bounds}\mspace{14mu} {on}\mspace{14mu} {variabl}\mspace{14mu} {es}} \end{matrix}} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}} & \square \end{matrix}$

In another embodiment, the conditional equations in PMV calculation is formulated using binary variables as the Mixed Integer Nonlinear Programming (MINLP)

$\left. {\left. {{\min \mspace{14mu} {\int_{0}^{T}{P_{hvac}\ {t}}}}\begin{matrix} \; & {{{{Eq}.\mspace{14mu} (14)}\text{-}(16)},{{{Eq}.\mspace{14mu} (17)}\text{-}(19)},(20),(21),(22)} \\ \; & \left. \begin{matrix} \begin{matrix} {z_{i} \in \left\{ {0,1} \right\}} \\ {{2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} \geq {\left( {12.1\sqrt{v_{{ar},i}}} \right)z_{i}}} \end{matrix} \\ {h_{c,i} = {\left( {2.38{{T_{{cl},i} - T_{z,i}}}^{0.25}} \right) \geq {\left( {12.1\sqrt{v_{{ar},i}}} \right)\left( {1 - z_{i}} \right)}}} \end{matrix} \right\} \\ \; & \begin{matrix} \; & {{{\forall 1} = 1},\ldots \mspace{14mu},N_{z}} \end{matrix} \end{matrix}} \right\} {s.t.\mspace{14mu} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}}{\min \mspace{14mu} {\int_{0}^{T}{P_{hvac}\ {t}\begin{matrix} \; & {{{Initial}\mspace{14mu} {condition}\mspace{14mu} {for}\mspace{14mu} {room}\mspace{14mu} {temperatu}\mspace{14mu} {res}},} \\ {s.t.} & {{humidity}\mspace{14mu} {and}\mspace{14mu} {wall}\mspace{14mu} {temperatu}\mspace{14mu} {res}} \\ \; & {{{{Bounds}\mspace{14mu} {on}\mspace{14mu} {PMV}_{i}{\forall i}} = 1},\ldots \mspace{14mu},N_{z}} \\ \; & {{{Bounds}\mspace{14mu} {on}\mspace{14mu} {Cf}},{\overset{.}{m}}_{{hvac},i}} \\ \; & {{Physical}\mspace{14mu} {bounds}\mspace{14mu} {on}\mspace{14mu} {variabl}\mspace{14mu} {es}} \end{matrix}}}}} \right\} {\forall{t \in \left\lbrack {0,T} \right.}}$

In another embodiment, comfort optimization is formulated using simplification of the conditional equations in PMV calculation as,

$\left. {{\min \mspace{14mu} {\int_{0}^{T}{P_{hvac}\ {t}}}}\begin{matrix} \begin{matrix} {{{Eq}.\mspace{14mu} (14)}\text{-}(16)} \\ {{{{Eq}.\mspace{14mu} (17)}\text{-}(19)},(20),(21),(22)} \end{matrix} \\ {{h_{c,i} = {{12.1\sqrt{v_{{ar},i}}{\forall 1}} = 1}},\ldots \mspace{14mu},N_{z}} \end{matrix}} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}$ $\begin{matrix} {{s.t.}\;} & {{{Initial}\mspace{14mu} {condition}\mspace{14mu} {for}\mspace{14mu} {room}\mspace{14mu} {temperature}},} \\ \; & {{humidity}\mspace{14mu} {and}\mspace{14mu} {wall}\mspace{14mu} {temperatures}} \\ \; & {\left. \begin{matrix} {{{{Bounds}\mspace{14mu} {on}\mspace{14mu} {PMV}_{i}{\forall i}} = 1},\ldots \mspace{14mu},N_{z}} \\ {{{Bounds}\mspace{14mu} {on}\mspace{14mu} {Cf}},{\overset{.}{m}}_{{hvac},i}} \\ {{Physical}\mspace{14mu} {bounds}\mspace{14mu} {on}\mspace{14mu} {variables}} \end{matrix} \right\} {\forall{t \in \left\lbrack {0,T} \right\rbrack}}} \end{matrix}$

Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention. 

We claim:
 1. A method for optimizing a heating, ventilation and air-conditioning (HVAC) system for a building while maximizing a comfort of occupants and minimizing energy consumption, comprising the steps of: modeling the building as a network of nodes and edges, wherein the nodes represent rooms, and the edges represent walls; modeling dynamics of temperatures and humidity in the rooms and the temperature of the walls and the building using differential equations and the network; modeling the comfort of the occupants by a predicted mean vote (PMV); formulating the minimizing as an optimal control problem; discretizing the optimal control problem using an integration technique to obtain a finite dimensional optimization problem; and solving the finite dimensional optimization problem using sparse linear algebra until convergence, wherein the steps are performed in a processor.
 2. The method of claim 1, further comprising: modeling dynamics of the building using a linear resistive-capacitive network.
 3. The method of claim 1, wherein the discretizing is performed using an explicit Euler method.
 4. The method of claim 1, wherein the discretizing is performed using an implicit Euler method.
 5. The method of claim 1, wherein the discretizing is performed using an implicit Runge-Kutta method.
 6. The method of claim 1, wherein the discretizing is performed using collocation on finite elements.
 7. The method of claim 1, further comprising: maximizing the comfort by smoothing of conditional statements in the PMV uses a smoothing parameter; discretizing using an implicit Euler method to obtain a finite dimensional nonlinear program; and solving the finite dimensional nonlinear program for a fixed value of the smoothing parameter with a nonlinear optimization procedure that uses sparse linear algebra, and repeating the steps for a sequence of decreasing values of smoothing parameter until convergence.
 8. The method of claim 1, wherein the comfort is formulated by conditional statement in the PMV using a binary variables; discretizing the optimal control problem using Implicit Euler technique to obtain a finite dimensional mixed integer nonlinear program; and solving a mixed integer nonlinear program using an algorithm that employs sparse linear algebra techniques for computational efficiency and repeating the steps for a sequence of decreasing values of smoothing parameter until convergence.
 9. The method of claim 1, wherein the comfort is modeled by simplifying conditional statement in PMV to one of conditions; discretizing using an implicit Euler method to obtain a finite dimensional nonlinear program; and solving the finite dimensional nonlinear program nonlinear using sparse linear algebra until convergence.
 10. The method of claim 1, wherein the comfort is achieved by relaxation of complementarity constraint modeling of conditional statements in the PMV uses a parameter; discretizing using an implicit Euler method to obtain a finite dimensional nonlinear program; and solving the finite dimensional nonlinear program for a fixed value of the relaxation parameter with a nonlinear optimization procedure that uses sparse linear algebra, and repeating the steps for a sequence of decreasing values of relaxation parameter until convergence. 